home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 6 / CU Amiga Magazine's Super CD-ROM 06 (1996)(EMAP Images)(GB)(Track 1 of 4)[!][issue 1997-01].iso / cucd / prog / gnu-c / gccopts1_3 / gccopts.doc < prev    next >
Text File  |  1995-08-07  |  11KB  |  319 lines

  1. Generated with Heddley v1.1
  2. Heddley v1.1 (C) Edd Dumbill 1994
  3.  
  4.  
  5.  
  6.  
  7.                           GCCOPTS v1.3
  8.  
  9.  
  10.                 Summary of this tremendous file:
  11.  
  12.  
  13.     I.    What is it           ...  A quick overview.
  14.     II.   How does it work ?   ...  Another overview...
  15.     III.  The Project group    ...  Guess what it is...
  16.     IV.   The Libraries group  ...  About... well, you know
  17.     V.    The Options group    ...  Another chapter...
  18.     VI.   The Makefile         ...  Still the same boring things
  19.     VII.  Example              ...  Forget it.
  20.     VIII. Misc                 ...  Yeepee ! The last chapter !
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  I. What is it ?
  27.    ------------
  28.  
  29. GccOpts is a program that allows you to automatically and quickly write a
  30. Makefile  for the Amiga GCC. It's simple enough, I hope, not to need any 
  31. documentation, so don't be too much disturbed if I don't offer you 
  32. megabytes of precise informations about this program (anyway I am reachable
  33. thru many net-addresses).
  34.  
  35. This program provides you a useful and graphical interface to easely make 
  36. your Makefiles for Amiga GCC. It needs AmigaOS 2.0 or +, and of course the
  37. ixemul.library. An example of a project with a graphical interface is
  38. provided in the package (see Example), have a look on it if you really
  39. don't know how works a makefile.
  40.  
  41. Just install it in your path, and enjoy (yes, this is real
  42. plug-and-play :))
  43.  
  44.  
  45.   What is a makefile ?
  46.   ------------------
  47.  
  48.   A "makefile" is a scriptfile that describes your project (the different
  49. componants of your program: c files, includes, objects files, libraries,
  50. etc).
  51.  
  52.   This file (which may be called makefile, or Makefile, or GNUMakefile)
  53. will be used by a program, called "make", whose job is to always keep your
  54. project correctly updated. So, if the program does not exist yet, it will
  55. simply compile it entirely. Or else it will compare the date and time of
  56. the source file with the date and time of the compiled file, and will
  57. compile it if,and only if, needed. All of this according to the rules
  58. described in the makefile.
  59.  
  60.   This provide a very powerly and easy-to-use developping system for the
  61. programmer.
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  II. How the does it work ?
  69.     ----------------------
  70.  
  71. Firstly you should install GccOpts by copying it to the gnu:bin/
  72. directory.
  73.  
  74. Launch GccOpts from the CLI or the Workbench, and have a look on the panel
  75. that just opened on the screen. On the right, a group named "Project" 
  76. contains a listview and some other gadgets. There are also two other 
  77. groups, "Libraries" and "Options". You'll have to refer to the concerned
  78. section of the manual for further information about each of this groups. 
  79.  
  80. After having filled some gadget with some random value of your own, press
  81. the gadget "Save Makefile", and the GccOpts will save a Makefile which
  82. purpose is to make you compile your project with the gnu Make command.
  83.  
  84. If you don't want to save the Makefile you have done or modified, just
  85. click on the "Cancel" gadget or on the upper-left CloseWindow gadget.
  86.  
  87.  
  88.  
  89.  
  90.  
  91. III. The "Project" group.
  92.      --------------------
  93.  
  94. In this group, the programmer (you!) will need to give some useful 
  95. informations about the project he (you, ever) want the Makefile to be
  96. done for.
  97.  
  98. First of all, the "Project" listview must contain all the  files that are
  99. part of the projet. The given files can be any *.c or *.o file (GccOpts
  100. will process them differently in the  makefile, however). Include files
  101. are accepted, and gcc will be told to use them, with the directive under
  102. the form :"-i your_include.h -i another_include.h"... If you add any *.o or
  103. *.a file in the project listview, it will be added to the Makefile as an
  104. archive that should not to be deleted by the "clean" rule.
  105.  
  106. To add a name into the listview, just type it inside the string gadget 
  107. below, and press enter. To delete one entry, select it with the mouse, and
  108. click on the DEL gadget below the listview. The gadget "?" will pop up a
  109. filerequester, and if you select a file with it, this one will be added to
  110. the listview. You can also let the program automatically choose the project
  111. files, by clicking the "SCAN" gadget. GccOpts will then scan all the files 
  112. in the current directory, and insert in the listview every .c file.
  113.  
  114. Three cycle gadgets below the listview can be used to select some options
  115. about the code generation. This gadgets are :
  116.  
  117. "Code" : which refers to the processor your project will be generated 
  118. for : 68000 - 68020 - 68030 - 68040/020-881 - 68040.
  119.  
  120. "Fpu" : only allows two value (could have been a boolean thing), fpu or 
  121. not : 68881 or NONE, default is NONE.
  122.  
  123. "Optimize" will permit to select the level of optimization for your 
  124. program : NONE, LEVEL 1, LEVEL 2, or LEVEL 3. Choose it in peace with 
  125. your concience and your memory (and you'll need some for the third level).
  126.  
  127. Another, last but not least, gadget allows you to select the name of the 
  128. output file. So the name of the gadget, you'd have guessed it, you clever
  129. programmer, is "Output". The name you give it will be used as the first
  130. rule of the Makefile, so that "make NAME_OF_YOUR_PROGRAM_IN_OUTPUT" will 
  131. just compile all the newer part of your project. This is the same than 
  132. "Make" alone, as this is the first rule of the Makefile.
  133.  
  134. That's all for the "Projet" group.
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141. IV. The "Libraries" group.
  142.     ----------------------
  143.  
  144. This group contains only one gadget, a listview, into which the  clever
  145. programmer will put the names of all the libraries that its project will
  146. need to be linked with. To know how to add an entry to the listview, please
  147. refer to the previous "Project group" section.
  148.  
  149. The name of the library can be either the normal file name, ie. 
  150. "libamiga.a" (without quotes) , or either "amiga". "libamiga" will also be
  151. accepted. This names will be inserted into the project as libraries, and 
  152. will be refered in the Makefile as "-lamiga".
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160. V. The "Options" group.
  161.    -------------------
  162.  
  163. This group contain a listview that will contain some of the options you 
  164. can need for your project. To flag or un-flag an option, just go onto the
  165. listview gadget, and click on the option you want to select/deselect. An 
  166. option is currently selected if a "*" is added at its beginning.
  167.  
  168. This options are divided into 6 parts : Code generation, Linking, Stack,
  169. Optimizing, Debugging, and  Warning. For more information about them,
  170. please read the gcc documention (click here -->READ GCC.GUIDE to do so).
  171. However, Names are quite clear, you shouldn't have problems with them, and
  172. if you have, you can contact me for more informations.
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180. VI. The Makefile.
  181.     -------------
  182.  
  183. The generated Makefile should not be modified if you want it to be 
  184. correctly re-processed by GccOpts. The makefile should be run by the Make
  185. command.
  186.  
  187. This Makefile contains three useful entries for the clever programmer :
  188.  
  189. - all : This rules will call the two others, clean and compile, and your
  190. project will be fully recompiled.
  191.  
  192. - clean : this will clean-up the project, ie. just remove every *.o file
  193. leading around.
  194.  
  195. - YOUR_PROJECT_NAME :  will recompile only the new or modified files,
  196. and create an executable named YOUR_PROJECT_NAME, according to the 
  197. informations and options given. The program will recursively scan the given
  198. c-source file for non-system include files (the token " #include" should be
  199. at the beginning of the line, with no blank or tabulation). Non-system
  200. include files are those bracketed with \" (while standart system includes
  201. should be bracketed with '<' and '>', and won't be scanned). All this
  202. includes will be linked to the correct c files that call them.
  203.  
  204. The default rule executed by Make (alone) is YOUR_PROJECT_NAME. In order to
  205. be able to re-read it correctly, GccOpts puts special informations inside
  206. the created Makefile, so don't modify it if you want to re-use later the
  207. result of your (not so) hard work.
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.   VII. The example.
  216.  
  217.   A very simple example is provided, and will quickl show you how GccOpts
  218. works. The program to compile is simply an "Hello world", and has strictly
  219. no importance. If Gccopts is not installed in your system, you should copy
  220. it in the gnu:bin/ directory.
  221.  
  222.   In the workbench screen, open the drawer "GccOpts_Example", and click on
  223. the Options icon. This icon will call the GccOpts program (which should
  224. already be installed in the gnu:bin/ or C: directory).
  225.  
  226.   There you can modify the compiler options. Once done, just click on the
  227. "Save Makefile" gadget. The makefile will be saved, and the program will
  228. close its window and shut down. Then, you can double-click on the
  229. MakeProject icon. This script will open a shell window and call the make
  230. program.
  231.  
  232.   You can also start GccOpts from a shell, and do just the same as above.
  233. To compile the project, just type "make" or "make all" in the shell.
  234.  
  235.   Please note that the program will be recompiled only if the c-source file
  236. is modified.
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243. VIII. Misc.
  244.      -----
  245.  
  246. This program is totally freeware, if you paid for this, be sure I have not
  247. seen a penny of your money. The source of this program is also free, 
  248. although not distributed, just ask for it, and I'll E-Mail it uuencoded
  249. to you.
  250.  
  251. Of course the author gives no warranty at all for this program, it may not
  252. work at all, crash your computer, destroy your terminal, invit your 
  253. stepmother at home for a full month, or any other terrible disaster, that's
  254. YOUR business and YOUR responsability in using this program.
  255.  
  256. Thanks to Philippe Brand for its wise advices.
  257.  
  258.  
  259.  TO DO:
  260.  ------
  261.  
  262.    - Flex & bison support
  263.    - coffee-machine support
  264.    - Whatever you clever programmer will tell me...
  265.  
  266.  
  267.  
  268. You can contact me for comments, requests, anything :
  269.  
  270.  
  271.     EMail    : rodrigo.reyes@ramses.fdn.org
  272.                rodrigo.reyes@electron.fr
  273.  
  274.     Fido     : 2:320/104.16
  275.                2:320/214.7
  276.  
  277.     AmigaNet : 39:180/1.16
  278.  
  279.     UCNet    : 88:320/1.7
  280.  
  281.     or snailmail : Rodrigo Reyes
  282.                    ELECTRON BBS
  283.                    Boîte postale 101
  284.                    91801 Brunoy France
  285.                    France
  286.  
  287.  
  288.  
  289.  
  290.  
  291.   History
  292.   -------
  293.  
  294.   v1.3 (6 August 1995)
  295.        - Automagically scan sources and generate dependencies with
  296.          non-system include files.
  297.        - Some minor bugfixes.
  298.        - The makefile is made more readable.
  299.  
  300.   v1.2 (30 July 1995)
  301.        - GCC2.7.0 options added : stackcheck and stackextend.
  302.        - The useless *.h files in the Project group are removed.
  303.        - Added the version number of GccOpts in the makefile to
  304.          prevent future option changes.
  305.        - Icons providing a graphical interface.
  306.  
  307.   v1.1 (25 May 1995)
  308.        - Scan gadget added to the Project Group.
  309.        - The generated MakeFile is improved.
  310.  
  311.   v1.0 (22 May 1995)
  312.        - First Release.
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.